3.80 \(\int \frac {(2+x) (d+e x)}{4-5 x^2+x^4} \, dx\)

Optimal. Leaf size=42 \[ -\frac {1}{2} (d+e) \log (1-x)+\frac {1}{3} (d+2 e) \log (2-x)+\frac {1}{6} (d-e) \log (x+1) \]

[Out]

-1/2*(d+e)*ln(1-x)+1/3*(d+2*e)*ln(2-x)+1/6*(d-e)*ln(1+x)

________________________________________________________________________________________

Rubi [A]  time = 0.05, antiderivative size = 42, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.095, Rules used = {1586, 2074} \[ -\frac {1}{2} (d+e) \log (1-x)+\frac {1}{3} (d+2 e) \log (2-x)+\frac {1}{6} (d-e) \log (x+1) \]

Antiderivative was successfully verified.

[In]

Int[((2 + x)*(d + e*x))/(4 - 5*x^2 + x^4),x]

[Out]

-((d + e)*Log[1 - x])/2 + ((d + 2*e)*Log[2 - x])/3 + ((d - e)*Log[1 + x])/6

Rule 1586

Int[(u_.)*(Px_)^(p_.)*(Qx_)^(q_.), x_Symbol] :> Int[u*PolynomialQuotient[Px, Qx, x]^p*Qx^(p + q), x] /; FreeQ[
q, x] && PolyQ[Px, x] && PolyQ[Qx, x] && EqQ[PolynomialRemainder[Px, Qx, x], 0] && IntegerQ[p] && LtQ[p*q, 0]

Rule 2074

Int[(P_)^(p_)*(Q_)^(q_.), x_Symbol] :> With[{PP = Factor[P]}, Int[ExpandIntegrand[PP^p*Q^q, x], x] /;  !SumQ[N
onfreeFactors[PP, x]]] /; FreeQ[q, x] && PolyQ[P, x] && PolyQ[Q, x] && IntegerQ[p] && NeQ[P, x]

Rubi steps

\begin {align*} \int \frac {(2+x) (d+e x)}{4-5 x^2+x^4} \, dx &=\int \frac {d+e x}{2-x-2 x^2+x^3} \, dx\\ &=\int \left (\frac {d+2 e}{3 (-2+x)}+\frac {-d-e}{2 (-1+x)}+\frac {d-e}{6 (1+x)}\right ) \, dx\\ &=-\frac {1}{2} (d+e) \log (1-x)+\frac {1}{3} (d+2 e) \log (2-x)+\frac {1}{6} (d-e) \log (1+x)\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.02, size = 39, normalized size = 0.93 \[ \frac {1}{6} (-3 (d+e) \log (1-x)+2 (d+2 e) \log (2-x)+(d-e) \log (x+1)) \]

Antiderivative was successfully verified.

[In]

Integrate[((2 + x)*(d + e*x))/(4 - 5*x^2 + x^4),x]

[Out]

(-3*(d + e)*Log[1 - x] + 2*(d + 2*e)*Log[2 - x] + (d - e)*Log[1 + x])/6

________________________________________________________________________________________

fricas [A]  time = 0.75, size = 32, normalized size = 0.76 \[ \frac {1}{6} \, {\left (d - e\right )} \log \left (x + 1\right ) - \frac {1}{2} \, {\left (d + e\right )} \log \left (x - 1\right ) + \frac {1}{3} \, {\left (d + 2 \, e\right )} \log \left (x - 2\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((2+x)*(e*x+d)/(x^4-5*x^2+4),x, algorithm="fricas")

[Out]

1/6*(d - e)*log(x + 1) - 1/2*(d + e)*log(x - 1) + 1/3*(d + 2*e)*log(x - 2)

________________________________________________________________________________________

giac [A]  time = 0.29, size = 38, normalized size = 0.90 \[ \frac {1}{6} \, {\left (d - e\right )} \log \left ({\left | x + 1 \right |}\right ) - \frac {1}{2} \, {\left (d + e\right )} \log \left ({\left | x - 1 \right |}\right ) + \frac {1}{3} \, {\left (d + 2 \, e\right )} \log \left ({\left | x - 2 \right |}\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((2+x)*(e*x+d)/(x^4-5*x^2+4),x, algorithm="giac")

[Out]

1/6*(d - e)*log(abs(x + 1)) - 1/2*(d + e)*log(abs(x - 1)) + 1/3*(d + 2*e)*log(abs(x - 2))

________________________________________________________________________________________

maple [A]  time = 0.01, size = 44, normalized size = 1.05 \[ \frac {d \ln \left (x -2\right )}{3}-\frac {d \ln \left (x -1\right )}{2}+\frac {d \ln \left (x +1\right )}{6}+\frac {2 e \ln \left (x -2\right )}{3}-\frac {e \ln \left (x -1\right )}{2}-\frac {e \ln \left (x +1\right )}{6} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((x+2)*(e*x+d)/(x^4-5*x^2+4),x)

[Out]

1/3*d*ln(x-2)+2/3*e*ln(x-2)+1/6*d*ln(x+1)-1/6*e*ln(x+1)-1/2*d*ln(x-1)-1/2*e*ln(x-1)

________________________________________________________________________________________

maxima [A]  time = 0.44, size = 32, normalized size = 0.76 \[ \frac {1}{6} \, {\left (d - e\right )} \log \left (x + 1\right ) - \frac {1}{2} \, {\left (d + e\right )} \log \left (x - 1\right ) + \frac {1}{3} \, {\left (d + 2 \, e\right )} \log \left (x - 2\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((2+x)*(e*x+d)/(x^4-5*x^2+4),x, algorithm="maxima")

[Out]

1/6*(d - e)*log(x + 1) - 1/2*(d + e)*log(x - 1) + 1/3*(d + 2*e)*log(x - 2)

________________________________________________________________________________________

mupad [B]  time = 0.84, size = 38, normalized size = 0.90 \[ \ln \left (x-2\right )\,\left (\frac {d}{3}+\frac {2\,e}{3}\right )-\ln \left (x-1\right )\,\left (\frac {d}{2}+\frac {e}{2}\right )+\ln \left (x+1\right )\,\left (\frac {d}{6}-\frac {e}{6}\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(((x + 2)*(d + e*x))/(x^4 - 5*x^2 + 4),x)

[Out]

log(x - 2)*(d/3 + (2*e)/3) - log(x - 1)*(d/2 + e/2) + log(x + 1)*(d/6 - e/6)

________________________________________________________________________________________

sympy [B]  time = 1.76, size = 304, normalized size = 7.24 \[ \frac {\left (d - e\right ) \log {\left (x + \frac {26 d^{3} + 66 d^{2} e - 9 d^{2} \left (d - e\right ) + 78 d e^{2} - 12 d e \left (d - e\right ) - 7 d \left (d - e\right )^{2} + 46 e^{3} + 3 e^{2} \left (d - e\right ) - 8 e \left (d - e\right )^{2}}{10 d^{3} + 69 d^{2} e + 102 d e^{2} + 35 e^{3}} \right )}}{6} - \frac {\left (d + e\right ) \log {\left (x + \frac {26 d^{3} + 66 d^{2} e + 27 d^{2} \left (d + e\right ) + 78 d e^{2} + 36 d e \left (d + e\right ) - 63 d \left (d + e\right )^{2} + 46 e^{3} - 9 e^{2} \left (d + e\right ) - 72 e \left (d + e\right )^{2}}{10 d^{3} + 69 d^{2} e + 102 d e^{2} + 35 e^{3}} \right )}}{2} + \frac {\left (d + 2 e\right ) \log {\left (x + \frac {26 d^{3} + 66 d^{2} e - 18 d^{2} \left (d + 2 e\right ) + 78 d e^{2} - 24 d e \left (d + 2 e\right ) - 28 d \left (d + 2 e\right )^{2} + 46 e^{3} + 6 e^{2} \left (d + 2 e\right ) - 32 e \left (d + 2 e\right )^{2}}{10 d^{3} + 69 d^{2} e + 102 d e^{2} + 35 e^{3}} \right )}}{3} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((2+x)*(e*x+d)/(x**4-5*x**2+4),x)

[Out]

(d - e)*log(x + (26*d**3 + 66*d**2*e - 9*d**2*(d - e) + 78*d*e**2 - 12*d*e*(d - e) - 7*d*(d - e)**2 + 46*e**3
+ 3*e**2*(d - e) - 8*e*(d - e)**2)/(10*d**3 + 69*d**2*e + 102*d*e**2 + 35*e**3))/6 - (d + e)*log(x + (26*d**3
+ 66*d**2*e + 27*d**2*(d + e) + 78*d*e**2 + 36*d*e*(d + e) - 63*d*(d + e)**2 + 46*e**3 - 9*e**2*(d + e) - 72*e
*(d + e)**2)/(10*d**3 + 69*d**2*e + 102*d*e**2 + 35*e**3))/2 + (d + 2*e)*log(x + (26*d**3 + 66*d**2*e - 18*d**
2*(d + 2*e) + 78*d*e**2 - 24*d*e*(d + 2*e) - 28*d*(d + 2*e)**2 + 46*e**3 + 6*e**2*(d + 2*e) - 32*e*(d + 2*e)**
2)/(10*d**3 + 69*d**2*e + 102*d*e**2 + 35*e**3))/3

________________________________________________________________________________________